<template>
  <div>
    <!-- 最上面 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>商品管理</el-breadcrumb-item>
      <el-breadcrumb-item>商品分类</el-breadcrumb-item>
    </el-breadcrumb>

    <!-- 卡片视图区域 -->
    <el-card>
      <!-- 添加分类按钮区域 -->
      <el-row>
        <el-col>
          <el-button type="primary">添加分类</el-button>
        </el-col>
      </el-row>

      <!-- 分类列表区域 -->
      <el-table :data="CateList" stripe border style="width: 100%">
        <!-- 索引列 -->
        <el-table-column type="index" label="#" width="53"> </el-table-column>
        <el-table-column prop="CateName" label="分类名称" width="259">
        </el-table-column>
        <el-table-column label="是否有效" width="259"> </el-table-column>
        <el-table-column label="排序" width="259"> </el-table-column>
        <el-table-column label="操作" width="259"> </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
    data() {
        return {
            //分类列表数据
            CateList: [],
        }
    },
    created() {
        this.getCateList();
    },
    methods() {
        async getCateList() {
            const {data:res} await this.$http.get('categories');
            console.log(res);
        }
    }
};
</script>

<style lang="less"></style>
